package org.synclib.model;

/**
 * A Change object wraps the old/new value of a particular property on an
 * object.
 * 
 * @author Craig Otis
 * @date Jun 4, 2010
 * @lastModified Jun 4, 2010
 * @param <T>
 *            The class of property which is wrapped by this Change.
 */
public abstract class AbstractChange<T> implements Change<T> {
	private String objectUUID;
	private String propertyName;
	private T oldValue;
	private T newValue;

	public AbstractChange(String objectUUID, String propertyName, T oldValue, T newValue) {
		this.objectUUID = objectUUID;
		this.propertyName = propertyName;
		this.oldValue = oldValue;
		this.newValue = newValue;
	}

	public String getObjectUUID() {
		return objectUUID;
	}

	public void setObjectUUID(String objectUUID) {
		this.objectUUID = objectUUID;
	}

	public String getPropertyName() {
		return propertyName;
	}

	public void setPropertyName(String propertyName) {
		this.propertyName = propertyName;
	}

	public T getOldValue() {
		return oldValue;
	}

	public void setOldValue(T oldValue) {
		this.oldValue = oldValue;
	}

	public T getNewValue() {
		return newValue;
	}

	public void setNewValue(T newValue) {
		this.newValue = newValue;
	}
}
